import './Mars3dSetUp.scss'
import { Button } from 'antd'
import PropTypes from 'prop-types'

import { optionsList } from '../../Assets/Params'
import { UseConfigSection } from '../../Template/FormTemplate'

const Mars3dFitA01 = ({ data, Off, ModalEvent }) => {
    Mars3dFitA01.propTypes = { data: PropTypes.object, Off: PropTypes.func, ModalEvent: PropTypes.object }

    const list = [
        { key: 107, uuid: 'FitA01', label: '场景模式', type: 'SelectTemp', name: 'sceneMode', options: optionsList.sceneList },
        { key: 101, uuid: 'FitA01', label: '3D渲染', type: 'RadioTemp', name: 'scene3DOnly', options: optionsList.isEnable },
        { key: 102, uuid: 'FitA01', label: '动态渲染', type: 'RadioTemp', name: 'highDynamicRange', options: optionsList.isEnable },
        { key: 103, uuid: 'FitA01', label: '抵抗锯齿', type: 'RadioTemp', name: 'fxaa', options: optionsList.isEnable },
        { key: 104, uuid: 'FitA01', label: '大气光圈', type: 'RadioTemp', name: 'showSkyAtmosphere', options: optionsList.isEnable },
        { key: 105, uuid: 'FitA01', label: '雾化效果', type: 'RadioTemp', name: 'fog', options: optionsList.isEnable },
        { key: 106, uuid: 'FitA01', label: '日照阴阳', type: 'RadioTemp', name: 'shadows', options: optionsList.isEnable },
        { key: 108, uuid: 'FitA01', label: '显示太阳', type: 'RadioTemp', name: 'showSun', options: optionsList.isEnable },
        { key: 109, uuid: 'FitA01', label: '显示月亮', type: 'RadioTemp', name: 'showMoon', options: optionsList.isEnable },
        { key: 110, uuid: 'FitA01', label: '显示太空', type: 'RadioTemp', name: 'showSkyBox', options: optionsList.isEnable },
        { key: 111, uuid: 'FitA01', label: '空间颜色', type: 'ColorPickerTemp', name: 'backgroundColor' },
    ]

    const onSubmit = () => {
        ModalEvent.emit({ type: 'scene', data })
        Off()
    }

    return (
        <div className='Mars3dSetUp Mars3dFitA01'>
            <div className='FormList'>
                {UseConfigSection(data, list)}
            </div>
            <div className='Button'>
                <Button type='primary' danger onClick={Off}>取消</Button>
                <Button type='primary' onClick={onSubmit}>保存</Button>
            </div>
        </div>
    );
};

export default Mars3dFitA01;